package model;

import java.math.BigDecimal;
import java.text.SimpleDateFormat;
import java.util.Date;

public class RegRecord {
    private Integer id;
    private Integer patientId;
    private Integer deptId;
    private Date regTime;
    private BigDecimal price;
    private Date payTime;

    //字段
    private String deptName;
    private String patientName;

    public RegRecord() {}
    public RegRecord(Integer id,Integer patientId,Integer deptId,Date regTime,BigDecimal price)
    {
        this.id=id;
        this.patientId=patientId;
        this.deptId=deptId;
        this.regTime=regTime;
        this.price=price;
    }
    public RegRecord(Integer id,Integer patientId,Integer deptId,Date regTime,BigDecimal price,
                     String deptName,String patientName)
    {
        this(id,patientId,deptId,regTime,price);
        this.deptName=deptName;
        this.patientName=patientName;
    }

    public Integer getId()
    {
        return id;
    }
    public Date getPayTime() {
        return payTime;
    }
    public void setId(Integer id)
    {
        this.id = id;
    }
    public Integer getPatientId()
    {
        return patientId;
    }
    public void setPatientId(Integer patientId)
    {
        this.patientId = patientId;
    }
    public Integer getDeptId()
    {
        return deptId;
    }
    public void setPayTime(Date payTime) {
        this.payTime = payTime;
    }
    public void setDeptId(Integer deptId)
    {
        this.deptId = deptId;
    }
    public Date getRegTime()
    {
        return regTime;
    }
    public void setRegTime(Date regTime)
    {
        this.regTime = regTime;
    }
    public BigDecimal getPrice()
    {
        return price;
    }
    public void setPrice(BigDecimal price)
    {
        this.price = price;
    }

    public String getDeptName()
    {
        return deptName;
    }
    public void setDeptName(String deptName)
    {
        this.deptName = deptName;
    }
    public String getPatientName()
    {
        return patientName;
    }
    public void setPatientName(String patientName)
    {
        this.patientName = patientName;
    }


    @Override
    public String toString()
    {
        SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
        StringBuffer str = new StringBuffer();
        str.append("RegRecord [id=").append(this.getId()).append(", patientId=").append(this.getPatientId())
                .append(", deptId=").append(this.getDeptId()).append(", regTime=").append(dateFormat.format(this.getRegTime()))
                .append(", price=").append(this.getPrice()).append(", deptName=").append(this.getDeptName())
                .append(", patientName=").append(this.getPatientName()).append("]");
        return str.toString();
    }

}
